package system.config.quartz.util;

import lombok.Getter;

/**
 * Quartz 定时任务触发器枚举
 *
 * @author mizepeng
 * @since 2023-3-21 上午 10:38
 */
@Getter
public enum TriggerEnum {

	/**
	 * AvatarDeleteJob：每7天的凌晨3时0分0秒执行一次
	 */
	AvatarDeleteJobTrigger("AvatarDeleteJobTrigger", OssConstants.GROUP_OSS, "0 0 3 1/7 * ?");

	private final String name;
	private final String group;
	private final String cron;

	TriggerEnum(String name, String group, String cron) {
		this.name = name;
		this.group = group;
		this.cron = cron;
	}

	public String getDescription() {
		return this.group + " - " + this.name;
	}

}
